package com.jzh.eurekaconsumerfeign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value ="eureka-client", configuration = FeignMultipartSupportConfig.class)
public interface UploadFileClient {
    @PostMapping(value = "/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String handleFileUpload(@RequestParam(value = "xiaomi",required = false)String xiaomi,@RequestPart(value = "file") MultipartFile file);
    @PostMapping(value = "/uploadFiles", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String handleFilesUpload(@RequestParam(value = "xiaomi",required = false)String xiaomi,@RequestPart(value = "files") MultipartFile[] files);
}
